package com.heima.string.stringJoiner;

import java.util.StringJoiner;

public class StringJoinerDemo01 {
    public static void main(String[] args) {

        int[] nums = {1, 2, 3};
        StringJoiner sj = new StringJoiner(", ", "[", "]");
        for (int i = 0; i < nums.length; i++) {
            sj.add(nums[i]+"");
        }
        System.out.println(sj);

    }
}
